nums = [4, 1, 2, 1, 2]

result = nums[0]

for i in range(1, len(nums)):
    result = result ^ nums[i]

print(result)
